package com.study.d5_io2;

import java.io.FileWriter;
import java.io.Writer;

public class FileWriteDemo {
    public static void main(String[] args) {
        try (
                Writer wr = new FileWriter("day10/src/dlei5.txt", true);
        ) {
            wr.write(65);
            wr.write('磊');
            wr.write("\r\n");
            wr.write("我爱china");
            wr.write("\r\n");
            wr.write("safa我爱你中国铯8暗示5sa",4,5);
            wr.write("\r\n");
            char[] charArray = "我爱中国".toCharArray();
            wr.write(charArray);
            wr.write("\r\n");
            wr.write(charArray,2,2);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
